<template>
  <el-dialog :title="title" :close-on-click-modal="false" :fullscreen="true" :visible.sync="visible"
    :before-close="cancel" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="50%">

    <div class="block">
    <el-timeline>
    <el-timeline-item timestamp="委托资料" placement="top">
      <el-card>
        <el-row class="JNPF-common-search-box" :gutter="16">
        <el-form @submit.native.prevent ref="elForm" :model="dataForm" :rules="rules">
          
          <el-col :span="8">
            <el-form-item label="委托单号" class="required" prop="fbillno">
              <el-input v-model="dataForm.fbillno" disabled/>
            </el-form-item>
          </el-col>

          <el-col :span="8">
            <el-form-item label="委托时间" class="required" prop="forddate">
              <el-input v-model="dataForm.forddate"/>
            </el-form-item>
            </el-col>

            <el-col :span="8">
            <el-form-item label="委托状态" class="required" prop="fbillstate">
              <el-input v-model="dataForm.fbillstate"/>
            </el-form-item>
          </el-col>

          <el-col :span="8">
            <el-form-item label="委托单位" class="required" prop="forduser">
              <el-input v-model="dataForm.forduser"/>
            </el-form-item>
          </el-col>

            <el-col :span="8">
              <el-form-item label="受理人" class="required" prop="frecuser">
                <el-input v-model="dataForm.frecuser"/>
              </el-form-item>
            </el-col>

            <el-col :span="8">
              <el-form-item label="完成时间" class="required" prop="foverdate">
                <el-input v-model="dataForm.foverdate"/>
              </el-form-item>
            </el-col>


            <el-col :span="8">
              <el-form-item label="质检费用" class="required" prop="ftotalamt">
                <el-input v-model="dataForm.ftotalamt"/>
              </el-form-item>
            </el-col>

            <el-col :span="8">
              <el-form-item label="品项数" class="required" prop="fitemcount">
                <el-input v-model="dataForm.fitemcount"/>
              </el-form-item>
            </el-col>

            <el-col :span="8">
              <el-form-item label="总件数" class="required" prop="fpiececount">
                <el-input v-model="dataForm.fpiececount"/>
              </el-form-item>
            </el-col>

            <el-col :span="24">
              <el-form-item label="备注">
                <el-input v-model="dataForm.fexplanation"/>
              </el-form-item>
            </el-col>

        </el-form>
        </el-row>
      </el-card>
    </el-timeline-item>

    <el-timeline-item timestamp="送检样品" placement="top">
      <el-card>
        <el-table :data="list0" border stripe>
          <el-table-column prop="FENTRYID" label="序号" width="85"></el-table-column>
          <el-table-column prop="FCATNO" label="样品编号" ></el-table-column>
          <el-table-column prop="FCATNAME" label="样品名称"></el-table-column>
          <el-table-column prop="FNUM" label="数量(份)"></el-table-column>
          <el-table-column prop="FUNIT" label="价格"></el-table-column>
          <el-table-column prop="FMONEY" label="金额"></el-table-column>
          <el-table-column prop="FMEMO" label="备注" ></el-table-column>
        </el-table>
      </el-card>
    </el-timeline-item>

    <el-timeline-item timestamp="化验标签" placement="top">
      <el-card>
        <el-table :data="list1" border stripe>
          <el-table-column prop="FENTRYID" label="序号" width="85"></el-table-column>
          <el-table-column prop="FCATNAME" label="样品名称"></el-table-column>
          <el-table-column prop="FNUM" label="标签码"></el-table-column>v
          <el-table-column prop="FUSER" label="化验人员" ></el-table-column>
          <el-table-column prop="FDATE" label="化验时间" ></el-table-column>
          <el-table-column prop="FMEMO" label="化验结果" ></el-table-column>
        </el-table>
      </el-card>
    </el-timeline-item>

    <el-timeline-item timestamp="留样标签" placement="top">
      <el-card>
        <el-table :data="list2" border stripe>
          <el-table-column prop="FENTRYID" label="序号" ></el-table-column>
          <el-table-column prop="FCATNO" label="样品编号" ></el-table-column>
          <el-table-column prop="FCATNAME" label="样品名称"></el-table-column>
          <el-table-column prop="FNUM" label="标签码"></el-table-column>
        </el-table>
      </el-card>
    </el-timeline-item>

    <el-timeline-item timestamp="危化品清单" placement="top">
      <el-card>
        <el-table :data="list5" border stripe>
          <el-table-column prop="FENTRYID" label="序号" ></el-table-column>
          <el-table-column prop="FWORKNAME" label="危化品名称" ></el-table-column>
          <el-table-column prop="FCAS" label="CAS号"></el-table-column>
          <el-table-column prop="FQTY" label="用量" ></el-table-column>
          <el-table-column prop="FUNIT" label="单位" ></el-table-column>
          <el-table-column prop="FMEMO" label="备注" ></el-table-column>
        </el-table>
      </el-card>
    </el-timeline-item>

    <el-timeline-item timestamp="耗材清单" placement="top">
      <el-card>
        <el-table :data="list4" border stripe>
          <el-table-column prop="FENTRYID" label="序号" ></el-table-column>
          <el-table-column prop="FWORKNO" label="耗材编号"></el-table-column>
          <el-table-column prop="FWORKNAME" label="耗材名称" ></el-table-column>
          <el-table-column prop="FQTY" label="数量" ></el-table-column>
          <el-table-column prop="FUNIT" label="单位" ></el-table-column>
          <el-table-column prop="FMEMO" label="备注" ></el-table-column>
        </el-table>
      </el-card>
    </el-timeline-item>

    <el-timeline-item timestamp="化验报告" placement="top">
      <el-card>
        <el-row class="JNPF-common-search-box" :gutter="16">
        <el-form @submit.native.prevent ref="elForm" :model="dataForm" :rules="rules">
          
          <el-col :span="16">
            <el-form-item label="报告内容" prop="FNOTE">
              <el-input
                type="textarea"
                :rows="3"
                placeholder="请输入内容"
                v-model="textarea1">
              </el-input>
            </el-form-item>
          </el-col>

          <el-col :span="8">
            <el-form-item label="报告人员">
                <el-input v-model="dataForm.freportuser"/>
            </el-form-item>
          </el-col>
        
         </el-form>
        </el-row>
      </el-card>
    </el-timeline-item>

    <el-timeline-item timestamp="核对说明" placement="top">
      <el-card>
        <el-row class="JNPF-common-search-box" :gutter="16">
        <el-form @submit.native.prevent ref="elForm" :model="dataForm" :rules="rules">
          
          <el-col :span="16">
            <el-form-item label="核对内容" prop="FNOTE">
              <el-input
                type="textarea"
                :rows="3"
                placeholder="请输入内容"
                v-model="textarea2">
              </el-input>
            </el-form-item>
          </el-col>

          <el-col :span="8">
            <el-form-item label="核对结果">
              <el-select v-model="dataForm.FCHECKSTATE" placeholder="请选择">
                <el-option
                  v-for="item in options1"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
        
         </el-form>
        </el-row>
      </el-card>
    </el-timeline-item>

    <el-timeline-item timestamp="审核说明" placement="top">
      <el-card>
        <el-row class="JNPF-common-search-box" :gutter="16">
        <el-form @submit.native.prevent ref="elForm" :model="dataForm" :rules="rules">
          
          <el-col :span="16">
            <el-form-item label="审核内容" prop="FNOTE">
              <el-input
                type="textarea"
                :rows="3"
                placeholder="请输入内容"
                v-model="textarea3">
              </el-input>
            </el-form-item>
          </el-col>

          <el-col :span="8">
            <el-form-item label="审核结果">
              <el-select v-model="dataForm.FBILLSTATE" placeholder="请选择">
                <el-option
                  v-for="item in options2"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
        
         </el-form>
        </el-row>
      </el-card>
    </el-timeline-item>

    <el-timeline-item timestamp="电子盖章" placement="top">
      <el-card>
        <el-row class="JNPF-common-search-box" :gutter="16">
        <el-form @submit.native.prevent ref="elForm" :model="dataForm" :rules="rules">
          
          <el-col :span="16">
            <div class="block">
              <el-image :src="src"></el-image>
              <span class="left-aligned">电子盖章密钥MTc4OTc2NTM0OUhJUzEwMjAzMDUucGRm</span>
              
            </div>
          </el-col>
        
         </el-form>
        </el-row>
      </el-card>
    </el-timeline-item>

  </el-timeline>

</div>

</el-dialog>
</template>

<style>
  .left-aligned {
  text-align: left;
}
</style>

<script>
  import jnpf from "@/utils/jnpf"
  export default {
    components: {  },
    props: {
      formationlist: {
        type: Array,
        default: [],
      },
    },
    data() {
      return {
        src:require('@/assets/images/me/sign.png'),
        textarea1: '报告准确无误',
        textarea2: '报告准确已核对，核对人 戚继光，核对时间 2024-12-19 17:04:21',
        textarea3: '报告内容已审核，审核人 吴大猷，审核时间 2024-12-20 10:04:21',

        title: "核对",
        insertorupdate: true,
        dataForm: {
            fbillno:"H2412160005",
            forddate:"2024-12-16",
            forduser:"上海全是肉供应链管理有限公司",
            frecuser:"曹操",
            fcatno:"24121500001",
            fcatname:"实验猪配合饲料",
            fsrcno:"P2412160005",
            fpiececount:20,
            ftotalamt:5900.00,
            fbillstate:"登记中",
            freportuser:"孔融",
            FCHECKSTATE:"已核对",
            FBILLSTATE:"已审核"
        },
        rules: {
          FUSERNUMBER:[
            { required: true, message: '请输入学籍号码', trigger: 'blur' },
          ],
          FUSER: [
            { required: true, message: '请输入申请人员', trigger: 'blur' },
          ],
          FMEMO: [
            { required: true, message: '请输入申请理由', trigger: 'blur' },
          ],
        },
        list0: [{  "FENTRYID":1,
                  "FCATNO": "100001",
                  "FCATNAME": "实验猪配合饲料",
                  "FNUM":5,
                  "FUNIT":"50",
                  "FMONEY":"250",
                  "FMEMO":""
                },
                { "FENTRYID":2,
                  "FCATNO": "100002",
                  "FCATNAME": "实验鸡配合饲料",
                  "FNUM":10,
                  "FUNIT":"20",
                  "FMONEY":"200",
                  "FMEMO":""
                }],

        list1:[{  "FENTRYID":1,
                "FCATNO": "100001",
                "FCATNAME": "实验猪配合饲料",
                "FNUM":"24121500001",
                "FUSER":"曹植",
                "FDATE":"2024-12-16 09:30:42",
                "FMEMO":"L202412160023.pdf"
              },
              { "FENTRYID":2,
                "FCATNO": "100001",
                "FCATNAME": "实验猪配合饲料",
                "FNUM":"24121500002",
                "FUSER":"曹植",
                "FDATE":"2024-12-16 09:35:42",
                "FMEMO":"L202412160053.pdf"
              },
              { "FENTRYID":3,
                "FCATNO": "100001",
                "FCATNAME": "实验猪配合饲料",
                "FNUM":"24121500003",
                "FUSER":"曹植",
                "FDATE":"2024-12-16 09:40:42",
                "FMEMO":"L202412160123.pdf"
              }],
         list2:[
              { "FENTRYID":1,
                "FCATNO": "100001",
                "FCATNAME": "实验猪配合饲料",
                "FNUM":"24121500004",
                "FUSER":"曹植",
                "FDATE":"2024-12-16 09:45:42",
                "FMEMO":"L202412160153.pdf"
              },
              { "FENTRYID":2,
                "FCATNO": "100001",
                "FCATNAME": "实验猪配合饲料",
                "FNUM":"24121500005",
                "FUSER":"曹植",
                "FDATE":"2024-12-16 09:50:42",
                "FMEMO":"L2024121602093.pdf"
              }],
        list3: [{ "FENTRYID":1,
                  "FWORKNAME": "危化品A",
                  "FCAS": "94-2-3",
                  "FQTY":500,
                  "FUNIT":"ml",
                  "FMEMO": ""
                },
                { "FENTRYID":2,
                  "FWORKNAME": "危化品A",
                  "FCAS": "94-2-3",
                  "FQTY":500,
                  "FUNIT":"ml",
                  "FMEMO": ""
                }],
        list5: [{ "FENTRYID":1,
                  "FWORKNO": "1002",
                  "FWORKNAME": "曹洪",
                  "FUFWORKFLAGNIT":"操作手",
                  "FMEMO": ""
                },
                { "FENTRYID":2,
                  "FWORKNO": "1003",
                  "FWORKNAME": "曹丕",
                  "FUFWORKFLAGNIT":"操作手",
                  "FMEMO": ""
                }],
        loading: false,
        visible: false,

        //所属校区选择数据
        options1: [{
          value: '1',
          label: '申请中'
        }, {
          value: '2',
          label: '已通过'
        }, {
          value: '3',
          label: '已驳回'
        }],

        //所属校区选择数据
        options2: [{
          value: '1',
          label: '本院人员'
        }, {
          value: '2',
          label: '培训人员'
        }, {
          value: '3',
          label: '外来人员'
        }],
        
      };
    },
    created() {
    },
    mounted() { },
    methods: {
      //
      init(FBILLNO) {
        this.dataForm.FBILLNO = FBILLNO;
        if (this.dataForm.FBILLNO) {
          this.title = "修改"
          this.insertorupdate = false;
        }
        else {
          this.title = "查询"
          this.dataForm.FBILLNO = "K" + Math.floor(Math.random() * 10000000) + 1;
          this.insertorupdate = true;
        }
        this.visible = true;
      },
      shoplist(data) {
        data.forEach(item => {
          this.list.push({
            FBILLNO: this.dataForm.FBILLNO
            , FENTRYID: "1"
            , FYEAR: 2024
            , FGRADE: "大一"
            , FCLASS: "化学系1班"
            , FSTUDNAME: "曹操"
          },{
            FBILLNO: this.dataForm.FBILLNO
            , FENTRYID: "2"
            , FYEAR: 2024
            , FGRADE: "大一"
            , FCLASS: "化学系1班"
            , FSTUDNAME: "刘备"
          })
        });
      },
      //
      cancel() {
        this.list = [];
        this.visible = false;
      },
    },
  };
</script>